﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    My Profile
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="CurrentMenuIDContent" runat="server" >profileMenu</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%  Dim profile As Equipment.DataAccess.User = DirectCast(ViewData("profile"), Equipment.DataAccess.User)%>
    <h2>
        My Profile</h2>
    <br />
    <% Using Html.BeginForm()%>
    <%= Html.ValidationSummary(False) %>
    <fieldset>
    <legend>User Info</legend>
        <table>
            <tr>
                <td>
                    Name:
                </td>
                <td>
                    <%: profile.FullName%>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Password:
                </td>
                <td>
                    <%= Html.Password("pass", profile.Password, New With {.class = "text"})%>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Confirm Password:
                </td>
                <td>
                    <%= Html.Password("confirmPass", profile.Password, New With {.class = "text"})%>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Email:
                </td>
                <td>
                   <%= Html.TextBox("email", profile.Email, New With {.class = "text"})%>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Site:
                </td>
                <td>
                   <%: profile.Site.Description%>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Roles:
                </td>
                <td>
                    <%= String.Join(", ", profile.Roles.Select(Function(r) r.Description))%>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Default Timezone:
                </td>
                <td>
                    <%= Html.DropDownList("TimeZone")%>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <input type="submit" name="SaveProfile" class="button middle-button" value="Save" />
                </td>
            </tr>
        </table>
    </fieldset>
    <% End Using%>
</asp:Content>
